<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);
String baseInfoJson= (String)request.getAttribute("baseInfoJson");
String hospitalVisitJson= (String)request.getAttribute("hospitalVisitJson");
String diseaseDiagInfoJson= (String)request.getAttribute("diseaseDiagInfoJson");
String cureInfoJson= (String)request.getAttribute("cureInfoJson");
String provincesList= (String)request.getAttribute("provincesList");
String operateInfoJson= (String)request.getAttribute("operateInfoJson");
String success= (String)request.getAttribute("success");
%>
<link rel="stylesheet" href="${basePath}/assets/bootstrap/css/bootstrap.css"/>    
<link rel="stylesheet" href="${basePath}/assets/css/medical_record/home_page.css"/>
<link rel="stylesheet" href="${basePath}/assets/css/basic.css"/>
<link rel="stylesheet" href="${basePath}/assets/jquery-ui/jquery-ui.css"/>


<script type="text/javascript" src="${basePath}/assets/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/assets/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="${basePath}/assets/jquery-ui/jquery-ui.js"></script>
<script type="text/javascript" src="${basePath}/assets/layer/layer.js"></script>
<script type="text/javascript" src="${basePath}/assets/js/medical_record/home_page.js"></script>
<script type="text/javascript" src="${basePath}/assets/js/medical_record/edit_basic_info.js"></script>

<script type="text/javascript" src="${basePath}assets/js/echarts.js"></script>




<script type="text/javascript" src="${basePath}/assets/My97DatePicker/WdatePicker.js"></script>
<input type="hidden" id="basePath" value="${basePath }">
<form action="${basePath}/report/editBedRelatedIndicatorsForm"
	method="post" id="bedRateUserForm">
<input type="hidden" id="month" name="month" value="${month}">
<table style="width:100%;" cellpadding="0" cellspacing="0" id="table">
<tbody>
<tr>
		<td colspan="6" style="text-align:right;">
			<input type="button" value="导出" class="btn"  onclick="exportDiagTop10Word()"/>
			<input type="button" value="保存" class="btn"  onclick="saveDiagTop10()">
		</td>
	</tr>
	
	       <tr >
				 <td class="tdLabel_7" style="width:60px">
				 	说明
				 </td>
				<td class="tdLabel_8" style="width:988px">
					<textarea style="width:97%;height:150px" id="note" name="note">${diagTop10DeptInfo.note}</textarea>
				</td>
			</tr>
			
		
			
			<tr>	
				
				<td class="tdLabel_8" colspan="8" style="width:988px">
					<table style="width:990px; margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
						<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics1Name}各科室患者疾病诊治顺位
								</td>
							</tr>
     		 			<tr>
     		 			 <td class="tdLabel_4" width="15%">科室</td>
     		 			 <td class="tdLabel_4" width="15%">编码</td>
      					 <td class="tdLabel_4" width="15%">名称</td>
      					 <td class="tdLabel_4" width="10%">数量</td>
      					 <td class="tdLabel_4" width="15%">构成比</td>
      					 <td class="tdLabel_4" width="15%">平均住院天数</td>
      					 <td class="tdLabel_4" width="15%">人均住院费用</td>
      					</tr>
      					
      					 <c:forEach var="diagRecord"   items="${diagTop10DeptInfo.diagTop10DeptRecord}">
      					 	 <c:forEach var="diagOrderRecord" varStatus="status"  items="${diagRecord.diagTop20OrderRecords}">
      					 		<c:choose>
    								<c:when test="${status.count == 1}">
       									<tr>
      					 					<td class="tdLabel_8" rowspan="${diagRecord.diagTop20OrderRecords.size()}">${diagRecord.deptName}</td>
     										<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagCode}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagName}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNum}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNumRate}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgInHospDays}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgCostFee}' /></td>
     					 				</tr>
    								</c:when>
    
    								<c:otherwise>
    								
    									 <tr>
     										<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagCode}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagName}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNum}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNumRate}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgInHospDays}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgCostFee}' /></td>
     					 				</tr>
       
    								</c:otherwise>
								</c:choose>
      					 
      					 	</c:forEach>
      					 </c:forEach>
      					
     					
   
     				</table>
				</td>
				
			</tr>
			
			<tr>	
				
				<td class="tdLabel_8" colspan="8" style="width:988px">
					<table style="width:990px; margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
						<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics2Name}各科室患者疾病诊治顺位
								</td>
							</tr>
     		 			<tr>
     		 			 <td class="tdLabel_4" width="15%">科室</td>
     		 			 <td class="tdLabel_4" width="15%">编码</td>
      					 <td class="tdLabel_4" width="15%">名称</td>
      					 <td class="tdLabel_4" width="10%">数量</td>
      					 <td class="tdLabel_4" width="15%">构成比</td>
      					 <td class="tdLabel_4" width="15%">平均住院天数</td>
      					 <td class="tdLabel_4" width="15%">人均住院费用</td>
      					</tr>
      					
      					 <c:forEach var="diagRecord"   items="${diagTop10DeptInfo.preMonthDiagTop10DeptRecord}">
      					 	 <c:forEach var="diagOrderRecord" varStatus="status"  items="${diagRecord.diagTop20OrderRecords}">
      					 		<c:choose>
    								<c:when test="${status.count == 1}">
       									<tr>
      					 					<td class="tdLabel_8" rowspan="${diagRecord.diagTop20OrderRecords.size()}">${diagRecord.deptName}</td>
     										<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagCode}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagName}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNum}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNumRate}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgInHospDays}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgCostFee}' /></td>
     					 				</tr>
    								</c:when>
    
    								<c:otherwise>
    								
    									 <tr>
     										<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagCode}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagName}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNum}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNumRate}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgInHospDays}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgCostFee}' /></td>
     					 				</tr>
       
    								</c:otherwise>
								</c:choose>
      					 
      					 	</c:forEach>
      					 </c:forEach>
      					
     					
   
     				</table>
				</td>
				
			</tr>
			
			<tr>	
				
				<td class="tdLabel_8" colspan="8" style="width:988px">
					<table style="width:990px; margin:0 auto; float:left; border-collapse:collapse;" cellpadding="0" cellspacing="0">
						<tr>
								<td colspan="8" style="text-align:center;font-size:16px;">
									${statisticalReportParam.statics3Name}各科室患者疾病诊治顺位
								</td>
							</tr>
     		 			<tr>
     		 			 <td class="tdLabel_4" width="15%">科室</td>
     		 			 <td class="tdLabel_4" width="15%">编码</td>
      					 <td class="tdLabel_4" width="15%">名称</td>
      					 <td class="tdLabel_4" width="10%">数量</td>
      					 <td class="tdLabel_4" width="15%">构成比</td>
      					 <td class="tdLabel_4" width="15%">平均住院天数</td>
      					 <td class="tdLabel_4" width="15%">人均住院费用</td>
      					</tr>
      					
      					 <c:forEach var="diagRecord"   items="${diagTop10DeptInfo.lastYearDiagTop10DeptRecord}">
      					 	 <c:forEach var="diagOrderRecord" varStatus="status"  items="${diagRecord.diagTop20OrderRecords}">
      					 		<c:choose>
    								<c:when test="${status.count == 1}">
       									<tr>
      					 					<td class="tdLabel_8" rowspan="${diagRecord.diagTop20OrderRecords.size()}">${diagRecord.deptName}</td>
     										<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagCode}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagName}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNum}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNumRate}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgInHospDays}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgCostFee}' /></td>
     					 				</tr>
    								</c:when>
    
    								<c:otherwise>
    								
    									 <tr>
     										<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagCode}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagName}' /></td>
      					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNum}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.diagNumRate}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgInHospDays}' /></td>
     					 					<td class="tdLabel_8"><input class="input_box" type="text" style="width:95%" value='${diagOrderRecord.avgCostFee}' /></td>
     					 				</tr>
       
    								</c:otherwise>
								</c:choose>
      					 
      					 	</c:forEach>
      					 </c:forEach>
      					
     					
   
     				</table>
				</td>
				
			</tr>
			

			
		</tbody>
</table>
	

</form>





<script>

      function exportDiagTop10Word(){
       window.location.href="${basePath}/report/exportDiagTop10Word";
     }

     //保存
     function saveDiagTop10(){
         var note = $("#note").val();
         $.ajax({
             type:"post",
             data:{note:note},
             url:"${basePath}/report/saveDiseaseOrderTop10ByDept",
             success:function(data){
            	 layer.alert(data.msg,{icon:1});
             }
         })
	
     }

 

	
</script>